package com.dingreading.cloud.ssxcx.dto;

import com.mybatisflex.annotation.RelationOneToMany;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 小程序课节资料表 实体类。
 *
 * @author EDY
 * @since 2025-08-15
 */
@Data
public class XcxLessonMaterialsDto implements Serializable {

    /**
     * 资料的唯一UID
     */
    private String uid;

    /**
     * 关联的课节UID
     */
    private String subjectLessonUid;

    /**
     * 资料阶段: 1-课前, 2-课中介绍, 3-课后要求 4-名师精讲
     */
    private Integer materialStage;

    /**
     * 纯文本
     */
    private String contentValue;

    /**
     * 启用状态：0-禁用，1-启用
     */
    private Integer enabled;

    /**
     * 创建时间
     */
    private Date addTime;

    /**
     * 最后修改时间
     */
    private Date editTime;

    /**
     * 添加人用户ID
     */
    private String addStaffUid;

    /**
     * 添加人姓名
     */
    private String addStaffName;

    /**
     * 最后修改人用户ID
     */
    private String lastStaffUid;

    /**
     * 最后修改人姓名
     */
    private String lastStaffName;

    /**
     * 科目UID
     */
    private String projectUid;
    /**
     * 阶段UID
     */
    private String stageUid;

    /**
     * 显示顺序
     */
    private Integer showOrder;


    @RelationOneToMany(
            selfField = "uid",
            targetTable = "xcx_lesson_quiz_options",
            targetField = "questionUid",
            extraCondition = "(enabled = 1)"
    )
    private List<XcxLessonQuizOptionsDto> quizOptions;

    @RelationOneToMany(
            selfField = "uid",
            targetTable = "xcx_materials_files",
            targetField = "questionUid",
            extraCondition = "(enabled = 1)"
    )
    private List<XcxMaterialsFilesDto> urls;

}
